package com.yanqu.road.server.manager.activity.tonbing.task.impl;

import com.yanqu.road.entity.enums.activity.tonbing.eTonBingTaskType;
import com.yanqu.road.server.manager.activity.tonbing.activity.CrossTonBingMatch;
import com.yanqu.road.server.manager.activity.tonbing.task.BaseCrossTonBingMatchTask;

public class CrossTonBingBattleTask extends BaseCrossTonBingMatchTask {

    private int cityId;

    public CrossTonBingBattleTask(CrossTonBingMatch match, long beginTime, int cityId) {
        super(match, beginTime);
        this.cityId = cityId;
    }

    @Override
    public void runTask() {
        match.crossTonBingBattleTask(cityId);
    }

    @Override
    public String getId() {
        return generateId(cityId);
    }

    @Override
    public eTonBingTaskType getType() {
        return eTonBingTaskType.Battle;
    }

    public static String generateId(int cityId) {
        return String.valueOf(cityId);
    }
}
